﻿using GISforTT_API;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Windows.Controls;

namespace GISforTT_Test
{
    
    
    /// <summary>
    ///This is a test class for CornerMenusMgrTest and is intended
    ///to contain all CornerMenusMgrTest Unit Tests
    ///</summary>
    [TestClass()]
    public class CornerMenusMgrTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for CornerMenusMgr Constructor
        ///</summary>
        [TestMethod()]
        [DeploymentItem("GISforTT_API.dll")]
        public void CornerMenusMgrConstructorTest()
        {
            CornerMenusMgr_Accessor target = new CornerMenusMgr_Accessor();
            // nothing to test
        }

        /// <summary>
        ///A test for CreateCornerMenus
        ///</summary>
        [TestMethod()]
        public void CreateCornerMenusTest()
        {
            // Test the two menu scenario
            CornerMenusMgr_Accessor target1 = new CornerMenusMgr_Accessor();
            target1.MenuType = CornerMenusMgr.CornerMenuType.TwoCornerMenus;
            target1.CreateCornerMenus();
            Assert.AreEqual(target1.MenuType, CornerMenusMgr.CornerMenuType.TwoCornerMenus);
            Assert.IsNotNull(target1.FunctionMenuUpperRight);
            Assert.IsNotNull(target1.FunctionMenuBottomLeft);
            Assert.IsNull(target1.FunctionMenuUpperLeft);
            Assert.IsNull(target1.FunctionMenuBottomRight);
            

            // Test the 4 menu scenario
            CornerMenusMgr_Accessor target2 = new CornerMenusMgr_Accessor();
            target2.MenuType = CornerMenusMgr.CornerMenuType.FourCornerMenus;
            target2.CreateCornerMenus();
            Assert.AreEqual(target2.MenuType, CornerMenusMgr.CornerMenuType.FourCornerMenus);
            Assert.IsNotNull(target2.FunctionMenuUpperRight);
            Assert.IsNotNull(target2.FunctionMenuBottomLeft);
            Assert.IsNotNull(target2.FunctionMenuUpperLeft);
            Assert.IsNotNull(target2.FunctionMenuBottomRight);
        }

        /// <summary>
        ///A test for CreateExitDialogs
        ///</summary>
        [TestMethod()]
        public void CreateExitDialogsTest()
        {
            CornerMenusMgr_Accessor target = new CornerMenusMgr_Accessor(); // TODO: Initialize to an appropriate value
            target.CreateExitDialogs();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for isExitDialogVisible
        ///</summary>
        [TestMethod()]
        public void isExitDialogVisibleTest()
        {
            CornerMenusMgr_Accessor target = new CornerMenusMgr_Accessor(); // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.isExitDialogVisible();
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for setLayoutRoot
        ///</summary>
        [TestMethod()]
        public void setLayoutRootTest()
        {
            CornerMenusMgr_Accessor target = new CornerMenusMgr_Accessor(); // TODO: Initialize to an appropriate value
            Canvas LayoutRoot = null; // TODO: Initialize to an appropriate value
            target.setLayoutRoot(LayoutRoot);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for showExitMenu
        ///</summary>
        [TestMethod()]
        public void showExitMenuTest()
        {
            CornerMenusMgr_Accessor target = new CornerMenusMgr_Accessor(); // TODO: Initialize to an appropriate value
            double orientation = 0F; // TODO: Initialize to an appropriate value
            CornerMenu.CornerMenuLocation location = new CornerMenu.CornerMenuLocation(); // TODO: Initialize to an appropriate value
            target.showExitMenu(orientation, location);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        
        /// <summary>
        ///A test for viewSearchDialog
        ///</summary>
        [TestMethod()]
        public void viewSearchDialogTest()
        {
            CornerMenusMgr_Accessor target = new CornerMenusMgr_Accessor(); // TODO: Initialize to an appropriate value
            target.viewSearchDialog();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

    }
}
